#ifndef ITEMVIEWADDDIALOG_H
#define ITEMVIEWADDDIALOG_H

#include <QtGui>
#include "core/itemmodel.h"
class ItemViewAddDialog : public QDialog
{
    Q_OBJECT
public:
    explicit ItemViewAddDialog(QWidget *parent = 0);


signals:

public slots:
    void onSaveButtonClicked();
    ItemModel *getItem();

protected:
    void initUiComponents();
    void initSignalsAndSlots();

    ItemModel *item;

    QVBoxLayout *mainLayout;
    QGridLayout *gridLayout;

    QLabel *headerLabel;
    QLabel *subHeaderLabel;

    QLabel *nameLabel;
    QLineEdit *nameEdit;

    QLabel *codeLabel;
    QLineEdit *codeEdit;

    QLabel *supplierLabel;
    QComboBox *supplierBox;

    QLabel *srpLabel;
    QLineEdit *srpEdit;

    QDialogButtonBox *buttonBox;

private:
    QComboBox *createSupplierBox();
};

#endif // ITEMVIEWADDDIALOG_H
